package com.wuyan.locationdog.view

import android.content.Context
import android.view.Gravity
import android.view.View
import android.view.animation.Animation
import android.widget.TextView
import com.wuyan.locationdog.R
import razerdp.basepopup.BasePopupWindow
import razerdp.util.animation.AnimationHelper
import razerdp.util.animation.Direction
import razerdp.util.animation.TranslationConfig


class ImgSelectPopup(context: Context?) : BasePopupWindow(context) {



    init {
        contentView = createPopupById(R.layout.pop_img_select)
        popupGravity = Gravity.BOTTOM

    }

    override fun onCreateShowAnimation(): Animation? {
        return AnimationHelper.asAnimation()
            .withTranslation(
                TranslationConfig()
                    .from(Direction.BOTTOM)
            )
            .toShow()
    }

    override fun onViewCreated(contentView: View) {
        super.onViewCreated(contentView)
        findViewById<TextView>(R.id.btnCancel).setOnClickListener { dismiss() }


    }
}
